package com.dj.product.k2faas.view.function;

import com.dj.product.k2faas.entity.function.Function;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * Created by 丁建 on 2025/9/23 16:36
 *
 * @author 丁建
 */
@Repository
public interface FunctionRepository extends PagingAndSortingRepository<Function, Long>, CrudRepository<Function, Long> {

    Page<Function> findAll(Specification<Function> spec, Pageable pageable);

    Optional<Function> findByName(String name);
}
